#include "Lists.h"
void addToRight(int x, LIST *L)
{
    NODE *tmp;
    tmp = (NODE *)malloc(sizeof(NODE));
    tmp -> info = x;
    tmp -> next = NULL;
    if(L -> last != NULL)
    {
        L -> last -> next = tmp;
        L -> last = tmp;
    }
    else
        L -> first = L -> last = tmp;
}
void printList(LIST L)
{
    NODE *tmp = L.first;
    if(tmp == NULL)
        printf("List is empty.");
    else
        for(; tmp != NULL; tmp = tmp -> next)
            printf("%d ", tmp -> info);
}
void concatenateLists(LIST *L1, LIST *L2)
{
    L1 -> last -> next = L2 -> first;
}

